<template>
  <div class='container'>
    <h2 class="article_title"></h2>
    <div class="article_content"></div>
  </div>
</template>

<script>
// import { detail } from '@/api/hmmm/articles'

export default {
  name: 'articles-preview',
  props: {
    articlePrev: {
      type: Object,
      required: true
    }
  },
  mounted () {
    const title = document.querySelector('.article_title')
    title.innerHTML = this.articlePrev.title

    const content = document.querySelector('.article_content')
    content.innerHTML = this.articlePrev.articleBody
  }

}
</script>

<style scoped>
  .container {
    padding: 0 10px 10px;
  }

  .article_title {
    margin: 10px 0 20px;
  }

  .article_content {
    padding: 10px;
    background: rgb(243, 243, 243);
  }
</style>
